<?php

namespace Common\Model;

use Think\Model;

class LeavelRatioModel extends Model {
    public static function newSelf()
    {
        return new self();
    }
    public function findOneById($id)
    {
        return $this->where(['id'=>$id])->find();
    }
    
	public function getByLeavelId($id)
	{
	    $info=$this->where(['leavel_id'=>$id])->select();
	    foreach ($info as $k=>$v)
	    {
	        $infos[$v['reward_type']]=$v;
	    }
	    return $infos;
	}
}